<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>

<script language="javascript" type="text/javascript">
    function submitForm(form,forward) {
        form.forwardAction.value = forward;
        form.submit();
    }
</script>

<html:html>
    <head>
            <%--<title><bean:message key="welcome.title"/></title>--%>
        <html:base/>
    </head>
    <body bgcolor="white">
    <html:form action="/register" method="post">
        <html:errors/>
        <html:hidden property="forwardAction" value=""/>
        <table>
            <tr>
                <td align="center" colspan="4">
                    <font size="4"><bean:message key="AddressForm.title"/></font>
            </tr>
            <tr>
                <td colspan="2" align="right">
                    Name
                </td>
                <td colspan="2"align="left">
                    <html:text property="name" size="30" maxlength="30"/>
                </td>
            </tr>

            <tr>
                <td colspan="2" align="right">
                    Age
                </td>
                <td colspan="2"align="left">
                    <html:text property="age" size="30" maxlength="3"/>
                </td>
            </tr>

            <tr>
                <td colspan="2" align="right">
                    Address
                </td>
                <td colspan="2" align="left">
                    <html:text property="address" size="30" maxlength="30"/>
                </td>
            </tr>

            <tr>
                <td colspan="2" align="right">
                    E-mail address
                </td>
                <td colspan="2" align="left">
                    <html:text property="emailAddress" size="30" maxlength="30"/>
                </td>
            </tr>

            <tr>
                <td>
                    <html:submit>Save</html:submit>
                </td>
                <td>
                    <html:cancel>Cancel</html:cancel>
                </td>
                <td>
                    <html:button onclick="submitForm( this.form, 'done' );" property="done">
                        <bean:message key="addressform.btn.done"/>
                    </html:button>
                </td>
                <td>
                    <html:button onclick="submitForm( this.form, 'index' );" property="home">
                        <bean:message key="addressform.btn.home"/>
                    </html:button>
                </td>
            </tr>
        </table>
    </html:form>
    </body>
</html:html>